// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import VueResource from 'vue-resource';
import axios from 'axios'
import Vuex from 'vuex'
import store from './assets/store'
import constant from './common/constant'

import 'element-ui/lib/theme-default/index.css';    // 默认主题
axios.defaults.withCredentials = true
axios.defaults.baseURL = '/api/'

Vue.use(ElementUI);
Vue.use(VueResource);
Vue.use(Vuex)
Vue.use(axios)
Vue.config.productionTip = false;


Vue.prototype.http = axios
Vue.prototype.EXECUTE_OK = 0
Vue.prototype.EXECUTE_ERROR = 1

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  constant,
  template: '<App/>',
  components: {App}
});

//处理导航
Vue.prototype.navigation = function (navigation) {
  console.log(navigation)
};
